﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Linq.Mapping;

namespace QuanLyDaiLy.Model
{
    [Table(Name="PhieuXuatHang")]
    public class CPhieuXuatHang
    {
        #region Properties
        [Column(Name="MaPhieu",IsPrimaryKey=true)]
        public int MaPhieu { get; set; }

        [Column(Name = "MaDaiLy", CanBeNull=true)]
        public int MaDaiLy { get; set; }

        [Column(Name = "NgayLapPhieu",CanBeNull=true)]
        public DateTime NgayLapPhieu { get; set; }

        [Column(Name = "TongTien",CanBeNull=true)]
        public int TongTien { get; set; }
        #endregion

        #region Constructor
        public CPhieuXuatHang()
        { }

        public CPhieuXuatHang(int madaily, DateTime ngaylapphieu, int tongtien)
        {
            Initialize(madaily, ngaylapphieu, tongtien);   
        }

        public CPhieuXuatHang(int maphieu, int madaily, DateTime ngaylapphieu, int tongtien)
        {
            Initialize(madaily, ngaylapphieu, tongtien);
            this.MaPhieu = maphieu;
        }

        public void Initialize(int madaily, DateTime ngaylapphieu, int tongtien)
        {
            this.MaDaiLy = madaily;
            this.NgayLapPhieu = ngaylapphieu;
            this.TongTien = tongtien;
        }
        #endregion
    }
}
